<?php 
/**
 *   Joomdiet - administrator/components/views/importdata/tmpl/default.php
 *   Author: Juan Dapena Paz (juan@bittingbits.com)
 *   Copyright (C) 2011 Bitting Bits S.L.
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
defined('_JEXEC') or die('Restricted access'); ?>
<div id="tabs-selector"><ul>
    <li><div id="variables-selector" class="tab"><?php echo JText::_('COM_JOOMDIET_VARIABLES'); ?></div></li>
    <li><div id="food-selector" class="tab"><?php echo JText::_('COM_JOOMDIET_FOOD'); ?></div></li>
    <li><div id="recipes-selector" class="tab"><?php echo JText::_('COM_JOOMDIET_RECIPES'); ?></div></li>
</ul></div>
<div style="clear: both;"></div>
<div id="tabs">
    <div id="variablestab">
        <form id="variablesform" action="index.php" method="post" name="adminForm" enctype="multipart/form-data">
            <div><input type="file" name="csvvariables" id="csvvariables" size="32" /></div>
            <br />
            <div><input type="submit" name="sendfile" id="sendfile" value="<?php echo JText::_('COM_JOOMDIET_SEND_VARS_CSV'); ?>" /></div>
            
            <input type="hidden" name="option" value="com_joomdiet" />
            <input type="hidden" name="controller" value="filereceiver" />
            <input type="hidden" name="task" value="processvarcsv" />
        </form>
    </div>
    <div id="foodtab">
        <div>
            <ul>
                <li>
                    <a href="index.php?option=com_joomdiet&controller=filereceiver&task=generate_food_example&format=raw&advanced=0"><?php echo JText::_('COM_JOOMDIET_SIMPLE_EXAMPLE'); ?></a>: <?php JText::_('COM_JOOMDIET_SIMPLE_EXAMPLE_EXPL'); ?>
                </li>
                <li>
                    <a href="index.php?option=com_joomdiet&controller=filereceiver&task=generate_food_example&format=raw&advanced=1"><?php echo JText::_('COM_JOOMDIET_ADVANCED_EXAMPLE'); ?></a>: <?php JText::_('COM_JOOMDIET_ADVANCED_EXAMPLE_EXPL'); ?>
                </li>
            </ul>
        </div>
        <form id="foodform" action="index.php" method="post" name="adminForm" enctype="multipart/form-data">
            <div><input type="file" name="csvfood" id="csvfood" size="32" /></div>
            <br />
            <div><input type="submit" name="sendfile" id="sendfood" value="<?php echo JText::_('COM_JOOMDIET_SEND_FOOD_CSV'); ?>" /></div>
            
            <input type="hidden" name="option" value="com_joomdiet" />
            <input type="hidden" name="controller" value="filereceiver" />
            <input type="hidden" name="task" value="processfoodcsv" />
        </form>
    </div>
    <div id="recipestab">
        <form id="recipesform" action="index.php" method="post" name="adminForm" enctype="multipart/form-data">
            <div><input type="file" name="csvrecipes" id="csvrecipes" size="32" /></div>
            <br />
            <div><input type="submit" name="sendfile" id="sendfile" value="<?php echo JText::_('COM_JOOMDIET_SEND_RECIPES_CSV'); ?>" /></div>
            
            <input type="hidden" name="option" value="com_joomdiet" />
            <input type="hidden" name="controller" value="filereceiver" />
            <input type="hidden" name="task" value="processreccsv" />
        </form>
    </div>
</div>


